package com.ggkt.mutithread;

public class SynconizedTest {
    public static int j=0;
    public static void main(String[] args) {
        try {
            for(int k=0;k<10;k++){
                new Thread(new Runnable() {
                    @Override
                    public void run() {
                        for (int i=0;i<100;i++){
                            j++;
                        }
                    }
                }).start();
            }
            Thread.sleep(500);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("the value j is: "+j);
    }
}
